Skip to content

[Terraform] feature fallback fix - #912

Merged
Samruddhi Khandale (samruddhikhandale) merged 26 commits into
devcontainers:mainfrom
gauravsaini04:terraform_feature_fallback_fix
Mar 28, 2024
Merged

[Terraform] feature fallback fix#912
Samruddhi Khandale (samruddhikhandale) merged 26 commits into
devcontainers:mainfrom
gauravsaini04:terraform_feature_fallback_fix

Conversation

@gauravsaini04

@gauravsaini04 Gaurav Saini (gauravsaini04) commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

Feature name:

  • Terraform

Description:

This PR introduces the following functionality:

  • When the latest tag for packages/tools installed by terraform feature does not have a source binary released yet, then it will continue installing the previous working version for which a source binary will be available
  • Packages for which patch has been applied to terraform feature - cosign, terraform, tflint, terragrunt, tfsec, terraform_docs

Changelog:

  • Updated install.sh such that the fallback mechanism is properly configured for all these above listed tools/ packages
  • Updated tests files to validate that when a fake version is tried to be downloaded with curl command thus representing a scenario when trying to access a source binary which is not deployed yet, then it will pick up the binary for the latest released tag which will eventually work successfully, and if github api limits are reached then will try to find a prev. version from find_prev_version_from_git_tags() function and get the binary for that instead.
  • Have updated tests for all the above mentioned packages.

Checklist:

  • Checked that applied changes work as expected

Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh Outdated
@gauravsaini04
Gaurav Saini (gauravsaini04) marked this pull request as ready for review March 17, 2024 14:30
@gauravsaini04
Gaurav Saini (gauravsaini04) requested a review from a team as a code owner March 17, 2024 14:30
Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh Outdated
@gauravsaini04
Gaurav Saini (gauravsaini04) marked this pull request as draft March 27, 2024 04:33
@gauravsaini04
Gaurav Saini (gauravsaini04) marked this pull request as ready for review March 27, 2024 16:20

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks great, left some comments

Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh Outdated
Comment thread src/terraform/install.sh Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you! 🎉

@samruddhikhandale
Samruddhi Khandale (samruddhikhandale) merged commit 988cdd2 into devcontainers:main Mar 28, 2024
@gauravsaini04
Gaurav Saini (gauravsaini04) deleted the terraform_feature_fallback_fix branch March 28, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants